home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 42 / Amiga Format AFCD42 (Issue 126, Aug 1999).iso / -serious- / misc / identify / identify_dev / arexx / expansions.ify < prev    next >
Text File  |  1999-05-14  |  1KB  |  45 lines

  1. /*****************************************************************
  2. **                                                              **
  3. **  expansions.ify      rexxidentify.library demonstration      **
  4. **                                                              **
  5. ******************************************************************
  6. **
  7. **      (c) 1997 by Richard Körber -- All Rights Reserved
  8. **
  9. **      You may use this example freely for your own programs.
  10. **
  11. */
  12.  
  13.   /* Add the library functions */
  14. CALL AddLib("/libs/rexxidentify.library",0,-30,0)
  15.  
  16.   /* Get the number of present expansions */
  17. number = ID_NumBoards()
  18.  
  19. SAY "I found" number "boards inside this computer:"
  20. SAY ""
  21.  
  22.   /* Check these expansions */
  23. DO i=0 TO ID_NumBoards()-1
  24.   manuf   = ID_Expansion(i,"MANUF")
  25.   prod    = ID_Expansion(i,"PROD")
  26.   class   = ID_Expansion(i,"CLASS")
  27.   address = ID_Expansion(i,"ADDRESS")
  28.   size    = ID_Expansion(i,"SIZE")
  29.   shut    = ID_Expansion(i,"SHUTUP")
  30.  
  31.   size    = Right(size,6)||"K"          /* Some small formatting */
  32.  
  33.   IF shut='1'                           /* And human readability */
  34.     THEN shut="SHUT UP"
  35.     ELSE shut="working"
  36.  
  37.   SAY i+1||":" address size ">" manuf prod class "("||shut||")"
  38. END
  39.  
  40. SAY ""
  41.  
  42. EXIT
  43.  
  44.  
  45.